<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>{:session('cp.cpsysname')}--商户管理平台</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="{:config('webconfig.description');}">
    <meta name="keywords" content="{:config('webconfig.keywords');}">
    <meta name="author" content="runoob">
    <link rel="stylesheet" href="__STATIC_URL__/static/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="__STATIC_URL__/static/css/index.css"/>
    <link rel="stylesheet" type="text/css" href="__STATIC_URL__/static/css/bootstrap-datetimepicker.css"/>
    <link rel="stylesheet" type="text/css" href="__STATIC_URL__/static/css/Statistics.css"/>
    <link rel="stylesheet" type="text/css" href="__STATIC_URL__/static/member/css/core.css"/>
    <link rel="stylesheet" type="text/css" href="__STATIC_URL__/static/member/css/member-info.css"/>
    <script src="__STATIC_URL__/static/js/jquery-2.1.4.min.js"></script>
    <script src="__STATIC_URL__/static/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script src="__STATIC_URL__/static/js/commen.js" type="text/javascript" charset="utf-8"></script>
    <script src="__STATIC_URL__/static/js/bootstrap-datetimepicker.js" type="text/javascript" charset="utf-8"></script>
    <link rel="stylesheet" type="text/css" href="__STATIC_URL__/static/bootstrap-table/bootstrap-table.css"/>
    <script src="__STATIC_URL__/static/bootstrap-table/bootstrap-table.js"></script>
    <script src="__STATIC_URL__/static/bootstrap-table/bootstrap-table-zh-CN.js"></script>
    <style>
        thead tr th{
            text-align: center;
        }
        thead tr th:nth-child(1){
            text-align: left;
        }
        tbody tr td{
            text-align: center;
        }
        tbody tr td:nth-child(1){
            text-align: left;
        }
        .card-box {
            height: 156px;
        }
        .panel .panel-body {
            padding:0px;
        }
        .pagecount{
            text-align: center;
            margin-bottom: 5px;
            padding:15px 15px 20px 0;
        }
        .pagecount span{
            display: inline-block;
            background: #ddd;
            margin:0 0 0 5px;
            width:80px;
            text-align: center;
            padding:2px 8px 2px 8px;
            border:1px solid #eee;
            color: #666;
        }
        .pagecount span a{
            color:#333;
        }
        .pagecount span a:hover{
            text-decoration: underline;
        }
        .thumb-sm {
            background: #eee;
        }
        .panel-search .panel-body {
            margin-top: 13px;
        }
        .nav li.active{
            border-bottom: 2px solid #2db7f5;
        }
        .nav.nav-tabs > li > a, .nav.tabs-vertical > li > a{
            font-size:14px;
        }
    </style>
</head>
<body>
{include file='public/header'/}
<section id="content">
    <!------------------导航-------------------------->
    {include file='public/left'/}
    <!--------------------------主要内容区域------------------------------------->
    <div class="content" style="background:none;">
        <div class="page-heading mgl15 mgr15">
            <ol class="breadcrumb">
                <li>当前位置是:</li>
                <li>
                    <a href="javascript:;">会员卡管理</a>
                </li>

                <li class="active">删卡会员</li>
            </ol>
        </div>
        <div style="background:#fff;">
            <div class="row" style="    margin-bottom: 20px;">
                <div class="col-lg-12">
                    <ul class="nav nav-tabs tabs"  style="width: 100%;">
                        <li class="tab">
                            <a href="{:url('reporttest/cardsurvey')}" >概览数据</a>
                        </li>
                        <li class="tab ">
                            <a href="{:url('reporttest/reportcardmemberlist')}">消费数据</a>
                        </li>

                        <li class="tab ">
                            <a href="{:url('reporttest/cardreglist')}">充值数据</a>
                        </li>
                        <li class="tab ">
                            <a href="{:url('reporttest/cardbonuslist')}">积分数据</a>
                        </li>
                        <li class="tab active">
                            <a href="{:url('reporttest/carddellist')}" class="active">退卡数据</a>
                        </li>
                        <li class="tab"></li>
                    </ul>
                </div>
            </div>
            <div class="panel panel-default panel-search mgl15 mgr15">
                <div class="panel-heading">
                    <h3 class="panel-title"><span class="glyphicon glyphicon-search pull-left" style="margin-right: 10px;"></span>筛选</h3>
                </div>
                <div class="panel-body">
                    <form action="" method="get" class="form-horizontal table-search form-search" role="form" id="machform">

                        <div class="col-sm-6 col-md-6 col-lg-4 ">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">卡号：</label>
                                <div class="col-sm-9">
                                    <input type="text" class="form-control"  placeholder="请输入卡号" value="" id="code">
                                </div>
                            </div>
                        </div>

                        <div class="col-sm-6 col-md-6 col-lg-4 ">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">时间：</label>
                                <div class="col-sm-9">
                                    <div class="">
                                        <input name="search_date" type="text" value=""  readonly="readonly" id="search_date" placeholder="请选择" class="form-control">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="panel-footer">
                    <a href="javascript:;" class="btn btn-primary" onclick="searchform()">查找</a>
                    <a href="javascript:;" class="btn btn-default" onclick="clearform()">清空</a>
                </div>
            </div>



            <div class="panel mgl15 mgr15">
                <div class="panel-heading addCharts" style="background:#ededed;">数据明细


                    <a href="javascript:;" onclick="load();" class="btn btn-info"
                       style="float: right;  margin-top: -7px;">点击下载</a>

                </div>
                <div class="panel-body">
                    <table class="table table-bordered table-striped" id="tablelist">

                    </table>
                </div>
            </div>

            {include file='public/footer'/}
        </div>
    </div>
</section>




</body>
<script src="__STATIC_URL__/static/laydate/laydate.js"></script>
<script src="/wntable.js"></script>
<script>
    laydate.render({
        elem: '#search_date',
        type: 'datetime',
        range: true,
        change: function(value, date,endDate){ //监听日期被切换

        }
    });
</script>
<script type="text/javascript">
    function searchform() {
        $("#tablelist" ).bootstrapTable('refresh');
    }
    $(function () {
        var type = "carddellist";
        var url = "{:url()}";
        getcolumn(type, url, "tablelist")
    });
    function load() {
        $.ajax({
            url: "{:url()}",
            data: {
                type:"out_excel",
                mchid: $("#mach").val(),//后台请求传的查询参数
                search_date:$("#search_date").val(),
                action_user:$("#action_user").val(),
                code:$("#code").val(),
            },
            dataType: "json",
            async: false,
            type: "post",
            success: function (res) {
                console.log(res);
                window.location.href = res;
            }
        })


    }
    $(function () {

        $(".checkAll").click(function(){
            if(this.checked){
                $(".checkSingel").prop("checked",true);
            }else{
                $(".checkSingel").prop("checked",false);
            }

        });
    });
    //筛选条件
    function filtertj() {
        $("#payform").submit();
    };
    //筛选条件
    function cleartj() {
        $(".form-virtical input").val("");
        $("select").val("");
    };
</script>
<script>

</script>
</html>
